﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AbstractFactory.Model;

namespace AbstractFactory
{
    class Program
    {
        static void Main(string[] args)
        {
            User model = new User();
            AbstractFactory factory = new SqlServerFactory();
            IUser iuser = factory.CreateUser();
            iuser.Insert(model);
            iuser.GetUser(1);

            //用反射+配置文件访问数据库更加方便
            IUser iu = DataAccess.CreateUser();
            iu.Insert(model);

            Console.Read();

        }
    }
}
